package com.yzy.soft.system.controller;

//import org.activiti.bpmn.model.BpmnModel;
//import org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator;
//import org.activiti.engine.impl.cmd.GetBpmnModelCmd;
//import org.activiti.engine.impl.interceptor.Command;
//import org.activiti.engine.impl.interceptor.CommandContext;
//import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
//import org.activiti.engine.impl.persistence.entity.ExecutionEntityManager;
//import org.activiti.image.ProcessDiagramGenerator;
//import org.activiti.image.impl.DefaultProcessDiagramGenerator;

public class ProcessInstanceDiagramCmd  {
//implements Command<InputStream>
    protected String processInstanceId;

    public ProcessInstanceDiagramCmd(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

//    public InputStream execute(CommandContext commandContext) {
//        ExecutionEntityManager executionEntityManager = commandContext
//            .getExecutionEntityManager();
//        ExecutionEntity executionEntity = executionEntityManager
//            .findById(processInstanceId);
////        List<String> activiityIds = executionEntity.getActivityId();
//        String processDefinitionId = executionEntity.getProcessDefinitionId();
//
//        GetBpmnModelCmd getBpmnModelCmd = new GetBpmnModelCmd(
//                processDefinitionId);
//        BpmnModel bpmnModel = getBpmnModelCmd.execute(commandContext);
//
////        InputStream is = new DefaultProcessDiagramGenerator().generateDiagram(bpmnModel,
////                "png", activiityIds);
//
//        return null;
//    }

}
